﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="HocVien_Lop.aspx.cs" Inherits="Admin_Lop_HocVien_Lop" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="HocVien_Lop.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <h2>Thêm học viên vào lớp học</h2>
    <p>
        <button type="submit" class="btn btn-default" id="themHV">Thêm học viên</button>
    </p>

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <p>
                <asp:Label ID="Label1" runat="server" Text="Danh sách lớp"></asp:Label>
            <asp:DropDownList ID="ddllophoc" runat="server" OnSelectedIndexChanged="ddllophoc_SelectedIndexChanged" AutoPostBack="true" ClientIDMode="Static"></asp:DropDownList>
            </p>
            <div>
                <asp:LinkButton ID="refresh" runat="server" OnClick="refresh_Click"></asp:LinkButton>
                <asp:Literal ID="ltrMess" runat="server"></asp:Literal>
                <asp:GridView ID="GridView1" CssClass="table table-bordered" runat="server" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GridView1_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="TenHV" HeaderText="Tên học viên" />
                        <asp:BoundField DataField="TenLop" HeaderText="Tên lớp" />
                        <asp:BoundField DataField="SoBuoiNghi" HeaderText="Số buổi nghỉ" />
                        <asp:TemplateField HeaderText="Tình trạng">
                            <ItemTemplate>
                                <asp:Literal ID="ltrTinhTrang" runat="server"></asp:Literal>
                            </ItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="Tác Vụ">
                            <ItemTemplate>
                                <a href="javascript:void();" relten="<%#Eval("TenHV") %>" onclick="return getInfo(this,<%#Eval("MaHV") %>,<%#Eval("MaLop") %>);" class="btn btn-default" title="Sửa">
                                    <i class="fa fa-pencil-square-o"></i>
                                </a>
                                <a href="javascript:void()" onclick="return showAlert(<%#Eval("MaHV") %>,<%#Eval("MaLop") %>);" class="btn btn-default m-l-3" title="Xóa">
                                    <i class="fa fa-trash-o"></i>
                                </a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div id="fthemhocvien" title="Thêm" style="display: none">
        <div class="form-group">
            <select id="drlDsHocVien" multiple="multiple" style="height:350px; width:100%">
            </select>
        </div>
    </div>

    <div id="fCapNhat" title="Cập nhật" style="display: none">
        <div class="form-group">
            <label>Số buổi nghỉ</label>
            <input type="text" class="form-control" id="txtSoBuoiNghi"/>
        </div>
        <div class="form-group">
            <label>Tình trạng</label>
            <select class="form-control" id="txtTinhTrang">
                <option value="1">Được phép thi</option>
                <option value="0">Không được phép thi</option>
            </select>
        </div>
    </div>
</asp:Content>

